/**
 * Copyright (c) 2017-2017 All Rights Reserved.
 */
package com.zbest.zpay.paycore.model.convert;

import com.zbest.zpay.paycore.dal.model.PayInfoDO;
import com.zbest.zpay.service.paycore.model.PayInfoDTO;

/**
 * 
 *
 * @author Administrator
 * @version $Id: PayInfoConvert.java, v 0.1 2017-5-10 下午11:24:08 Administrator Exp $
 */
public final class PayInfoConvert {

    public static PayInfoDO initPayInfoDO(PayInfoDTO payInfo) {
        PayInfoDO payInfoDO = new PayInfoDO();
        payInfoDO.setAmount(payInfo.getAmount());
        payInfoDO.setCurrency(payInfo.getCurrency());
        payInfoDO.setOutOrderNo(payInfo.getTradeOrderNo());
        payInfoDO.setPayType(payInfo.getPayType().getCode());
        payInfoDO.setRefPayInfoId(payInfo.getRefPayInfoId());
        payInfoDO.setUserId(payInfo.getUserId());
        return payInfoDO;
    }
}
